<html>
<head>
<script src="http://code.jquery.com/jquery-1.4.2.js"></script>
<script type="text/javascript">
  $(document).ready(function(){
   $("#ajaxButton").click(function(){
    $.ajax({
     type:"POST",
     url:"ajax.php", //goi toi file ajax.php
     data:"name="+$("#name").val()+"&year="+$("#year").val(),//du lieu gui di
     success:function(html){
      $("#responseDiv").html(html);
     }
    });
   });
  });
 </script>
</head>
<body>
	<table>
		<tr>
			<td>Name:</td>
			<td><input type="text" id="name" /></td>
		</tr>
		<tr>
			<td>Year:</td>
			<td><input type="text" id="year" /></td>
		</tr>
	</table>
	<div>
		<input type="button" value="ajax" id="ajaxButton" />
	</div>
	<div id="responseDiv"></div>
	<br>
	<div>
	<form action="ajax.php">
	<input type="text" name="nname">
	<input type="text" name="yyear">
	<input type="submit" name="submit" value="submit">
	</form>
	</div>


</body>
</html>
